<?php

/* 
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

namespace Home\Controller;
use OT\DataDictionary;
class CommentController extends HomeController {
    
    public  function Index(){

    }
   //联系我们
    public function feedback(){        
        $data= array();
        $data['title']=$_POST['c_name'];
        $data['c_name']=$data['title'];
        $data['c_email']=$_POST['c_email'];
        $data['description']=$_POST['description'];
        $data['category_id']=$_GET['category_id'];
        $data['pid']=$_GET['pid'];
        $data['model_id']=$_GET['model_id'];
        $data['type']=2;
        $data['status'] =1; 
        $data['create_time']=time();
        $data['update_time']=time();
        $res = D('Document')->updatefeedback($data);
        if(!$res){
            $this->error(D('Document')->getError());
        }else{
            $this->success($res['id']?'更新成功':'评论成功', Cookie('__forward__'));
        }                    
  }

    
}